<?php

/* 文章 article */
class CourseqaModel extends BaseModel
{
    var $table  = 'courseqa';
    var $prikey = 'qa_id';
    var $_name  = 'courseqa';

    /* 添加编辑时自动验证 */
    var $_autov = array(
        'question' => array(
            'required'  => true,    //必填
            'min'       => 1,       //最短1个字符
            'max'       => 100,     //最长100个字符
            'filter'    => 'trim',
        ),
        'answer' => array(
            'required'  => true,    //必填
            'min'       => 1,       //最短1个字符
            'max'       => 500,     //最长500个字符
            'filter'    => 'trim',
        ),
    );

}